package part18;

import java.io.IOException;
import java.io.StringReader;

/**
 * @author wcj
 * @Date 2021/6/3 17:18
 * @Version 1.0
 */
public class Part188 {

    /**
     * IO流的经典使用方式字二:利用字符串创建一个StringReader()，然后逐个字符读取
     *
     * @param args
     * @throws IOException
     */
    public static void main(String[] args) throws IOException {
        StringReader in = new StringReader(Part187.read("./src/part18/Part188.java"));
        int c;
        while ((c = in.read()) != -1) {
            System.out.println((char) c);
        }
    }
}
